//
//  HMDetailViewController.swift
//  sinaweibo
//
//  Created by lst on 16/5/20.
//  Copyright © 2016年 lst. All rights reserved.
//

import UIKit

class HMDetailViewController: UIViewController {
    
    override func viewDidLoad() {
        super.viewDidLoad()
        self.title = "\(navigationController?.childViewControllers.count ?? 0)"
        //设置背景色
        view.backgroundColor = UIColor.whiteColor()
  
        //设置进入多级页面
        self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "下一层", style: .Plain, target: self, action: #selector(next))
    }
    
    @objc private func next() {
        let next = HMDetailViewController()
        navigationController?.pushViewController(next, animated: true)
        
    }
    
    
//    @objc private func back(){
//        navigationController?.popViewControllerAnimated(true)
//    }
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    
    /*
     // MARK: - Navigation
     
     // In a storyboard-based application, you will often want to do a little preparation before navigation
     override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
     // Get the new view controller using segue.destinationViewController.
     // Pass the selected object to the new view controller.
     }
     */
    
}
